package com.bynk.bynk_demo.service.impl;

import com.bynk.bynk_demo.dao.UserMapper;
import com.bynk.bynk_demo.model.User;
import com.bynk.bynk_demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;
    @Override
    public String addUser(User user) {

        if (null==user)
            return "user为空";

        int code = userMapper.addUser(user);

        if (code==1)
            return "成功";
        else
            return "失败";
    }
}
